package auctionhaus

import org.springframework.context.support.StaticApplicationContext

class Customer {
    String emailAddress
    String password
    Date dateCreated
    Date lastUpdated
    boolean isAdmin
    static hasMany = [listings:Listing, bids:Bid]
    static mappedBy = [listings:"seller"]

    static constraints = {
        emailAddress(email:true, unique:true)
        password(size:6..8, blank:false)
    }

    @Override
    public String toString()
    {
        return emailAddress
    }
}
